package io.github.source.media.bean.extractor;

import android.os.SystemClock;


import io.github.source.Source;

/**
 * 推送的地址，就直接截取
 */
public class Push implements Source.Extractor {

    @Override
    public boolean match(String scheme, String host) {
        return "push".equals(scheme);
    }

    @Override
    public String fetch(String url) throws Exception {
        String result = url.substring(7);
//        if (App.activity() != null) VideoActivity.start(App.activity(), url.substring(7));
        SystemClock.sleep(500);
        return result;
    }

    @Override
    public void stop() {
    }

    @Override
    public void exit() {
    }
}
